home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 701-725 / 707 / rayshade / raysh4pl6.zoo / Doc / Globals < prev    next >
Text File  |  1991-08-08  |  2KB  |  86 lines

  1. /*
  2.  * Variables shared by the various libraries:
  3.  */
  4.  
  5. Float
  6. RSAbstmp
  7.  
  8.     Temporary variable used by the fabs() macro to keep
  9.     expressions from being evaluated twice (e.g.,
  10.     fabs(cos(x)) is expanded to ((x=cos(x) < 0 ? -x : x)
  11.     rather than ((x=cos(x) < 0 ? -cos(x) : cos(x))    ).
  12.     Could be removed by making fabs a function or not minding
  13.     if expressions are evaluated twice.
  14.  
  15. SampleInfo
  16. Sampling
  17.  
  18.     Variables used to control sampling.
  19.     Used in conjunction with a ray's sample number
  20.     (ray->sample) to determine how to sample, for example,
  21.     extended light sources.
  22.  
  23. /*
  24.  * Variables shared by modules in the rayshade application:
  25.  */
  26. RSCamera
  27. Camera
  28.     Camera definition.  Used in viewing, setup, and parsing.
  29.  
  30. RSScreen
  31. Screen
  32.     Screen information.  Used in viewing, setup, and parsing.
  33.  
  34. RSOptions
  35. Options
  36.     
  37.     Options of all sorts.
  38.  
  39. RSStats
  40. Stats
  41.  
  42.     Statistical information.
  43.  
  44. Medium
  45. TopMedium
  46.  
  47.     "Air" description (index of refraction and atmospheric effects).
  48.     Used in viewing, parsing, and ShadeRay.
  49.  
  50. Light *
  51. Lights
  52.  
  53.     Array of defined lights.  Used in parsing and in shade().
  54.  
  55. /*
  56.  * Application-provided functions:
  57.  */
  58. Surface *
  59. GetShadingSurf(hitlist)
  60. HitList *hitlist
  61.  
  62.     Given a hitlist, return the surface to be used in shading.
  63.  
  64. int
  65. TraceRay(ray, hitlist, mindist, maxdist)
  66. Ray *ray;
  67. HitList *hitlist;
  68. Float mindist, *maxdist;
  69.  
  70.     Intersect the top-level object with the given ray.
  71.     Probably as simple as:
  72.         return intersect(World, ray, hitlist, mindist, maxdist)
  73.  
  74. void
  75. RLerror(level, pattern, arg1, arg2, arg3)
  76. int level;
  77. char *pattern, *arg1, *arg2, *arg3;
  78.  
  79.     Error-reporting function.  'level' indicates the severity of
  80.     the error (see libcommon/error.h).  'pattern' and the
  81.     args are suitable for printing via:
  82.         fprintf(stderr, patter, arg1, arg2, arg3);
  83.     Note that as the args are cast to char *'s, printing, for
  84.     example, several doubles, will not work.  (Being more
  85.     rigorous about it would require varargs or something similar.)
  86.